pkgname=fxmark
pkgver=git
pkgrel=1
url='https://github.com/sslab-gatech/fxmark'
arch=('i386' 'x86_64')
license=('GPL')
makedepends_debian_11=(sudo automake libtool bison flex)
source=('https://github.com/filebench/filebench.git' 'https://github.com/sslab-gatech/fxmark.git')
md5sums=('SKIP' 'SKIP')

build()
{
	benchmark_path="${pkgdir}/lkp/benchmarks/${pkgname}"
	mkdir -p ${benchmark_path}
	cd $srcdir/fxmark
	make || return

	cd ../filebench || return
	git checkout 1.4.9.1 || return 
	libtoolize || return
	aclocal || return
	autoheader || return
	automake --add-missing || return
	autoconf || return
	./configure --prefix ${benchmark_path}/filebench || return
	make || return
	make install || return
}

package()
{
	benchmark_path="${pkgdir}/lkp/benchmarks/${pkgname}"
	cp -af "$srcdir/$pkgname/"* $benchmark_path
}
